<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script>
    var arr = ['red', 'green', 'blue'];
    for (var i = 0; i < 3; i++) {
      console.log(arr[i]);
    }
    // 1.因为我们的数组引号从0开始，所以 i 必须 从 0开始 i < 3
    // 2.输出的时候 arr[i] i 计数器当索引号来用
  </script>
</head>

<body>

</body>

</html>